<?php

namespace app\index\model\tan;

use think\Model;

class EnjoyCurrencyLog extends Model
{
    /**
     * 显示芮享币消费记录
     * @param type $id
     */
    public function showlist($id,$data=[]){
        $where['user_id']=$id;
        if(! empty($data['kdate'])){
            $where["createtime"]=[">=",$data['kdate']];
        }
        if(! empty($data['edate'])){
            $where["createtime "]=["<=",$data['edate']];
        }
        return $this->where($where)->order("id desc")->paginate();
    }
}
